package graphvizapi;

import java.io.*;

public class Main {

   public static void main(String[] args)
   {
      Main p = new Main();
      p.start();
   }

   private void start()
   {
      GraphViz gv = new GraphViz();
      gv.addln(gv.start_graph());
      gv.addln("A -> B;");
      gv.addln("A -> C;");
      gv.addln(gv.end_graph());
      System.out.println(gv.getDotSource());
      File out = new File("c:\\out.gif");
      gv.writeGraphToFile(gv.getGraph(gv.getDotSource()), out);
   }
}
